Ext.define("ECAT.view.DelFavComfirm", {
	extend: 'Ext.ActionSheet',
    requires: ['Ext.Button'],
    xtype: 'delfavcomfirm',
    config : { 
    	cls : 'touming',
//        defaults : {
//        	xtype : 'button',
//        },
        items: [{
        		xtype : 'title',
        		cls : 'comfirmdel',
        		height: 40,
        		title : '确认删除操作'
            },{
            	xtype : 'button',
                text: '删除',
                ui: 'decline',
                height : 80,
                border : 3,
                margin : '10 50 25 50',
                style : 'font-size: 2em',
                handler: function() {
                	var topbar = Ext.getCmp('topbar'),
        				list_img_fav = Ext.getCmp('list_img_fav'),
        				del_imgs = list_img_fav.del_imgs,
        				store = list_img_fav.store,
        				index;
        			del_imgs.forEach(function(img){
        				index = store.find('name', img);
        				store.removeAt(index);
        			});
        			store.sync();
        			list_img_fav.refreshList();
        			topbar.setBtnDel();
        			
        			topbar.delfavcomfirm.hide();
                }
            },{
            	xtype : 'button',
                text: '取消',
                cls : 'black',
                height : 80,
                border : 3,
                margin : '25 50 25 50',
                style : 'font-size: 2em',
                handler: function() {
                	var topbar = Ext.getCmp('topbar');
                	topbar.delfavcomfirm.hide();
                }
            },
            {
        		xtype : 'container',
        		height: 1
            }
        ]
    }
});